<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
	<link id="easyuiTheme" rel="stylesheet" type="text/css" href="../jquery-easyui-1.5.3/themes/default/easyui.css">
    <link rel="stylesheet" type="text/css" href="../jquery-easyui-1.5.3/themes/icon.css"/>
    <script type="text/javascript" src="../jquery-easyui-1.5.3/jquery.min.js"></script>
    <script type="text/javascript" src="../jquery-easyui-1.5.3/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../jquery-easyui-1.5.3/locale/easyui-lang-zh_CN.js"></script>
	<script type="text/javascript" src="../resources/js/JsBarcode.all.min.js"></script>
    <script type="text/javascript">
	    var contextPath = function() {
	        return  "/" + location.pathname.split("/")[1];
	    }
	    
		function getValue(name){
			var str=window.location.search;
			if (str.indexOf(name)!=-1){
				var pos_start=str.indexOf(name)+name.length+1;
				var pos_end=str.indexOf("&",pos_start);
				if (pos_end==-1){
					return str.substring(pos_start);
				} else {
					return str.substring(pos_start,pos_end);
				}
			} else {
				return "";
			}
		}
		
		var  themeName = getValue("theme");
		if (themeName!=""){
		    var cssurl  = $('#easyuiTheme').attr('href');  
		    var href = cssurl.substring(0, cssurl.indexOf('themes')) + 'themes/' + themeName + '/easyui.css';  
		    $('#easyuiTheme').attr('href', href);  
		}   
		
	    //将表单数据转为json
	    function form2Json(id) {
	        var arr = $("#" + id).serializeArray();
	        var jsonStr = "";
	        jsonStr += '{';
	        for (var i = 0; i < arr.length; i++) {
	            jsonStr += '"' + arr[i].name + '":"' + arr[i].value + '",'
	        }
	        jsonStr = jsonStr.substring(0, (jsonStr.length - 1));
	        jsonStr += '}';
	        var json = JSON.parse(jsonStr);
	        return json;
	    }
	    
	    //将表单数据转为json格式的字符串，当然也可以JSON.stringify(data)
	    function form2JsonStr(id) {
	        var arr = $("#" + id).serializeArray();
	        var jsonStr = "";
	        jsonStr += '{';
	        for (var i = 0; i < arr.length; i++) {
	            jsonStr += '"' + arr[i].name + '":"' + arr[i].value + '",'
	        }
	        jsonStr = jsonStr.substring(0, (jsonStr.length - 1));
	        jsonStr += '}';
	        return jsonStr;
	    }
	</script>

</head>

<style>
    .datagrid-btable{
        width:100%;
    }
    .datagrid-header-inner{
        width:100%;
    }
    .datagrid-header{
        width:100%;
    }
    .datagrid-htable{
        width:100%;
    }
    .datagrid-cell{margin:auto;}
    .fitem{text-align:left}
    .ftitle{text-align:center}
</style>

<body>

	<div class="easyui-layout" data-options="fit:true">
		<div data-options="region:'center',title:'印章种类列表'">	  
	        <table id="datagrid_sealcategoryinfo"  class="easyui-datagrid" style="width:100%;height:100%"></table>
	        <div id="toolbar_sealcategoryinfo">		
	        	<form name="searchform" method="post" action="" id ="searchform">	
					<td height="30">
					    <a id="submit_search">搜索</a>
					    <a id="reset_search">重置</a>
					</td>
					<td width="70" height="30">
						<strong>印章类型名称：</strong>
					    <input class="easyui-textbox" type="text" id="search_insureNo" name="insureNo" size=20 >
					</td>	
				</form>
	        </div>
		</div>
		<div data-options="region:'east',title:'详细信息'" style="width:800px">         
	        <div id="toolbar_info">		
	            <a id="btn_reload" href="#" class="easyui-linkbutton" iconCls="icon-reload" >重载</a>
	            <a id="btn_save" href="#" class="easyui-linkbutton" iconCls="icon-save" >修改</a>
	            <a id="btn_delete" href="#" class="easyui-linkbutton" iconCls="icon-cancel" >删除</a>
	        </div>	
		    <br>	
	    	<form id="form_info" method="post" >
		        <div class="fitem">	        	
		            <label>&nbsp;名称：</label>
		            <input id="category_name" type="text" name="category_name" class="easyui-textbox" required="true" style="align:left;width:180px"/>
		        </div>
		        <br>	
		        <div class="fitem">
		            <label>&nbsp;尺寸：</label>
		            <input type="text" name="size" class="easyui-textbox" style="width:180px"/>
				</div>
		        <br>  
		        <div class="fitem">
					<label>&nbsp;说明：</label>
		            <input type="text" name="desc" class="easyui-textbox" data-options="multiline:true" style="width:180px;height:40px"/>	      		
		        </div>
		        <br>  
		        <div class="fitem">
					<label>&nbsp;印模：</label>
		        	<br>
					<label>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</label>  
		            <img src="images/' + rowData.itemid + '.png" style="width:320px;height:240px;">	      		
		        </div>
		    </form>
		    
		    <form id="form1" method="post" enctype="multipart/form-data">
			    <input class="easyui-textbox" id="applicationId" name="applicationId">
			    <input class="easyui-filebox" data-options="prompt:'浏览'" id="contractFile" name="contractFile" style="width:155px">
			    <input class="easyui-filebox" data-options="prompt:'浏览'" id="invoiceFile" name="invoiceFile" style="width:155px">
			</form>	        
		</div>
	</div>

	<div id="MEETING_BOOKING_3" class="easyui-window" title="会议预订" data-options="closed:true,resizable:false,minimizable:false,collapsible:false,maximizable:false" style="width:650px;height:382px;padding:5px;">
		<div class="easyui-layout" data-options="fit:true">
			<div data-options="region:'north',collapsible:false,title:'用户信息'" style="height:115px; padding: 5px;">
				<form id="MEETING_BOOKING_9" action="">
					<table style="width: 100%;">
						<tr>
							<td style="width: 18%;" align="right">用户账户：</td>
							<td style="width: 32%;"><input name="bookingUsername" class="easyui-textbox" data-options="editable:false,value:taken" style="width:100%;"></td>
							<td style="width: 18%;" align="right">用户姓名：</td>
							<td style="width: 32%;"><input name="bookingRealname" class="easyui-textbox" data-options="editable:false,value:MEETING_BOOKING_REALNAME" style="width:100%;"></td>
						</tr>
						<tr>
							<td style="width: 18%;" align="right">所属机构：</td>
							<td style="width: 32%;"><input name="bookingAgent" class="easyui-textbox" data-options="editable:false,value:MEETING_BOOKING_AGENT" style="width:100%;"></td>
							<td style="width: 18%;" align="right">所属部门：</td>
							<td style="width: 32%;"><input name="bookingDept" class="easyui-textbox" data-options="editable:false,value:MEETING_BOOKING_DEPT" style="width:100%;"></td>
						</tr>
					</table>
				</form>
			</div>
			<div data-options="region:'center',title:'预订信息'" style="padding:5px;">
				<form id="MEETING_BOOKING_10" method="post">
					<table style="width: 100%;">
						<tr>
							<td style="width: 18%;" align="right">会议名称：</td>
							<td style="width: 32%;"><input name="meetingTitle" id="MEETING_BOOKING_6" class="easyui-textbox" data-options="" style="width:100%;"></td>
							<td style="width: 18%;" align="right">会议日期：</td>
							<td style="width: 32%;"><input name="meetingDate" id="MEETING_BOOKING_5" class="easyui-datebox" data-options="editable:false,value:MEETING_BOOKING_DATE.format('yyyy-MM-dd')" style="width:100%;"></td>
						</tr>
						<tr>
							<td style="width: 18%;" align="right">开始时间：</td>
							<td style="width: 32%;">
								<select class="easyui-combobox" id="MEETING_BOOKING_11" name="startHour" data-options="editable:false" style="width:60px;">
									<option value="08" selected>08</option>
									<option value="09">09</option>
									<option value="10">10</option>
									<option value="11">11</option>
									<option value="12">12</option>
								</select>
								<span>:</span>
								<select class="easyui-combobox" id="MEETING_BOOKING_12" name="startMinute" data-options="editable:false" style="width:60px;">
									<option value="00" selected>00</option>
									<option value="10">10</option>
									<option value="20">20</option>
								</select>
							</td>
							<td style="width: 18%;" align="right">结束时间：</td>
							<td style="width: 32%;">
								<select class="easyui-combobox" id="MEETING_BOOKING_13" name="endHour" data-options="editable:false" style="width:60px;">
									<option value="15">15</option>
									<option value="16">16</option>
									<option value="17">17</option>
									<option value="18" selected>18</option>
								</select>
								<span>:</span>
								<select class="easyui-combobox" name="endMinute" id="MEETING_BOOKING_14" data-options="editable:false" style="width:60px;">
									<option value="00" selected>00</option>
									<option value="10">10</option>
									<option value="20">20</option>
								</select>
							</td>
						</tr>
						<tr>
							<td style="width: 18%;" align="right">会议地点：</td>
							<td style="width: 32%;">
								<input class="easyui-combobox" name="meetingRoomId" id="MEETING_BOOKING_15"
										data-options="editable:false,valueField:'meetingRoomId',textField:'meetingRoom',url:'./meeting-booking/load-meeting-room-list'"
										style="width:100%;">
							</td>
							<td style="width: 18%;" align="right">会议类型：</td>
							<td style="width: 32%;">
								<input class="easyui-combobox" name="meetingTypeId" id="MEETING_BOOKING_16"
										data-options="editable:false,valueField:'meetingTypeId',textField:'meetingType',url:'./meeting-booking/load-meeting-type-list'"
										style="width:100%;">
							</td>
						</tr>
						<tr>
							<td style="width: 18%;" align="right">视频会层级：</td>
							<td style="width: 32%;">
								<input class="easyui-combobox" name="meetingLevelId" id="MEETING_BOOKING_17"
										data-options="editable:false,valueField:'meetingLevelId',textField:'meetingLevel'"
										style="width:100%;">
							</td>
							<td style="width: 18%;" align="right">会议发起方：</td>
							<td style="width: 32%;">
								<input class="easyui-combobox" name="meetingHost" id="MEETING_BOOKING_18"
										data-options="editable:false,valueField:'meetingHostId',textField:'meetingHost',url:'./meeting-booking/load-meeting-host-list'"
										style="width:100%;">
							</td>
						</tr>
					</table>
				</form>
			</div>
			<div data-options="region:'south',border:false" style="text-align:right;padding:5px 0 0;">
				<a class="easyui-linkbutton" data-options="iconCls:'icon-ok'" href="javascript:void(0)" onclick="bookingMeeting();">提交申请</a>
				<a class="easyui-linkbutton" data-options="iconCls:'icon-cancel'" href="javascript:void(0)" onclick="$('#MEETING_BOOKING_3').window('close');">关闭窗口</a>
			</div>
		</div>
	</div>


</body>

<script type="text/javascript">

    $(function () {
    	
    	alert(contextPath()+'/seal/getSealCategory');
    	    	
    	$('#datagrid_sealcategoryinfo').datagrid({
    		loadMsg:'正在加载数据...',
    	    url:contextPath()+'/seal/getSealCategory',
    	    toolbar:'#toolbar_sealcategoryinfo',
    	    queryParams: form2Json("searchform"),
    	    pagination: true,
            pageSize:'100',
            pageList:[100,300,500],            
            rownumbers: true,
            striped: true,
            fit: true,
            fitColumns: false, //不自动适应列宽
            singleSelect: true, 
            selectOnCheck: true,
            checkOnSelect: true,
    	    columns:[[
    			// {field:'ck',checkbox:true}, 
    			{field:'name',title:'印章种类名称',width:100},
    			{field:'desc',title:'印章种类说明',width:200},
    			{field:'size',title:'印章尺寸',width:100}
    	    ]]
    	});  
    	    
    });
    
</script>


</html>



